{{template "common/header.html" .}}
{{template "common/nav.html" .}}

<section class="main">
    <div class="container">
        <div class="columns">
            <div class="column is-12">
                <form method="POST" action="{{baseUrl}}/user/signin">
                    <input type="hidden" name="redirectUrl" value="{{.RedirectUrl}}"/>

                    <div class="widget">
                        <div class="header">登录</div>
                        <div class="content">

                            <div class="field">
                                <label class="label">用户名/邮箱</label>
                                <div class="control has-icons-left">
                                    <input name="username" class="input is-success" type="text" placeholder="请输入用户名或邮箱"
                                           value="{{.Username}}">
                                    <span class="icon is-small is-left"><i class="iconfont icon-username"></i></span>
                                </div>
                            </div>

                            <div class="field">
                                <label class="label">密码</label>
                                <div class="control has-icons-left">
                                    <input name="password" class="input" type="password" placeholder="请输入密码"
                                           value="{{.Password}}">
                                    <span class="icon is-small is-left"><i class="iconfont icon-password"></i></span>
                                </div>
                            </div>

                            {{if .ErrMsg}}
                                <div class="field">
                                    <div class="control">
                                        <strong><p class="help is-danger">{{.ErrMsg}}</p></strong>
                                    </div>
                                </div>
                            {{end}}

                            <div class="field">
                                <div class="control">
                                    <button id="btnSignIn" type="submit" class="button is-success">登录</button>
                                    <a class="button is-dark" href="{{baseUrl}}/user/github/login"><i
                                                class="iconfont icon-github"></i>&nbsp;<strong>推荐使用Github一键登录</strong></a>
                                    <a class="button is-text" href="{{baseUrl}}/user/signup">没有账号？点击这里去注册！</a>
                                </div>
                            </div>

                        </div>
                    </div>
                </form>
            </div>

        </div>


    </div>
</section>

{{template "common/footer.html" .}}
